3.2.99 \(\int (a+b \sinh ^4(c+d x))^2 \, dx\) [199]

Optimal. Leaf size=125 \[ \frac {1}{128} \left (128 a^2+96 a b+35 b^2\right ) x-\frac {b (160 a+93 b) \cosh (c+d x) \sinh (c+d x)}{128 d}+\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d} \]

[Out]

1/128*(128*a^2+96*a*b+35*b^2)*x-1/128*b*(160*a+93*b)*cosh(d*x+c)*sinh(d*x+c)/d+1/192*b*(96*a+163*b)*cosh(d*x+c
)^3*sinh(d*x+c)/d-25/48*b^2*cosh(d*x+c)^5*sinh(d*x+c)/d+1/8*b^2*cosh(d*x+c)^7*sinh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3288, 1171, 1828, 393, 212} \begin {gather*} \frac {1}{128} x \left (128 a^2+96 a b+35 b^2\right )+\frac {b (96 a+163 b) \sinh (c+d x) \cosh ^3(c+d x)}{192 d}-\frac {b (160 a+93 b) \sinh (c+d x) \cosh (c+d x)}{128 d}+\frac {b^2 \sinh (c+d x) \cosh ^7(c+d x)}{8 d}-\frac {25 b^2 \sinh (c+d x) \cosh ^5(c+d x)}{48 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Sinh[c + d*x]^4)^2,x]

[Out]

((128*a^2 + 96*a*b + 35*b^2)*x)/128 - (b*(160*a + 93*b)*Cosh[c + d*x]*Sinh[c + d*x])/(128*d) + (b*(96*a + 163*
b)*Cosh[c + d*x]^3*Sinh[c + d*x])/(192*d) - (25*b^2*Cosh[c + d*x]^5*Sinh[c + d*x])/(48*d) + (b^2*Cosh[c + d*x]
^7*Sinh[c + d*x])/(8*d)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 1171

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQ
uotient[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2,
x], x, 0]}, Simp[(-R)*x*((d + e*x^2)^(q + 1)/(2*d*(q + 1))), x] + Dist[1/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1
)*ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] &&
 NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rule 3288

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^4)^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dis
t[ff/f, Subst[Int[(a + 2*a*ff^2*x^2 + (a + b)*ff^4*x^4)^p/(1 + ff^2*x^2)^(2*p + 1), x], x, Tan[e + f*x]/ff], x
]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[p]

Rubi steps

\begin {align*} \int \left (a+b \sinh ^4(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a-2 a x^2+(a+b) x^4\right )^2}{\left (1-x^2\right )^5} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}-\frac {\text {Subst}\left (\int \frac {-8 a^2+b^2+8 \left (3 a^2+b^2\right ) x^2-8 (3 a-b) (a+b) x^4+8 (a+b)^2 x^6}{\left (1-x^2\right )^4} \, dx,x,\tanh (c+d x)\right )}{8 d}\\ &=-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}+\frac {\text {Subst}\left (\int \frac {48 a^2+19 b^2-96 \left (a^2-b^2\right ) x^2+48 (a+b)^2 x^4}{\left (1-x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{48 d}\\ &=\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}-\frac {\text {Subst}\left (\int \frac {-3 \left (64 a^2-32 a b-29 b^2\right )+192 (a+b)^2 x^2}{\left (1-x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{192 d}\\ &=-\frac {b (160 a+93 b) \cosh (c+d x) \sinh (c+d x)}{128 d}+\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}+\frac {\left (128 a^2+96 a b+35 b^2\right ) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{128 d}\\ &=\frac {1}{128} \left (128 a^2+96 a b+35 b^2\right ) x-\frac {b (160 a+93 b) \cosh (c+d x) \sinh (c+d x)}{128 d}+\frac {b (96 a+163 b) \cosh ^3(c+d x) \sinh (c+d x)}{192 d}-\frac {25 b^2 \cosh ^5(c+d x) \sinh (c+d x)}{48 d}+\frac {b^2 \cosh ^7(c+d x) \sinh (c+d x)}{8 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 92, normalized size = 0.74 \begin {gather*} \frac {24 \left (128 a^2+96 a b+35 b^2\right ) (c+d x)-96 b (16 a+7 b) \sinh (2 (c+d x))+24 b (8 a+7 b) \sinh (4 (c+d x))-32 b^2 \sinh (6 (c+d x))+3 b^2 \sinh (8 (c+d x))}{3072 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sinh[c + d*x]^4)^2,x]

[Out]

(24*(128*a^2 + 96*a*b + 35*b^2)*(c + d*x) - 96*b*(16*a + 7*b)*Sinh[2*(c + d*x)] + 24*b*(8*a + 7*b)*Sinh[4*(c +
 d*x)] - 32*b^2*Sinh[6*(c + d*x)] + 3*b^2*Sinh[8*(c + d*x)])/(3072*d)

________________________________________________________________________________________

Maple [A]
time = 1.12, size = 100, normalized size = 0.80

method result size
default \(a^{2} x +\frac {\left (-\frac {7}{16} b^{2}-a b \right ) \sinh \left (2 d x +2 c \right )}{2 d}+\frac {\left (\frac {7}{32} b^{2}+\frac {1}{4} a b \right ) \sinh \left (4 d x +4 c \right )}{4 d}+\frac {35 b^{2} x}{128}+\frac {3 a b x}{4}-\frac {b^{2} \sinh \left (6 d x +6 c \right )}{96 d}+\frac {b^{2} \sinh \left (8 d x +8 c \right )}{1024 d}\) \(100\)
risch \(\frac {35 b^{2} x}{128}+a^{2} x +\frac {3 a b x}{4}+\frac {b^{2} {\mathrm e}^{8 d x +8 c}}{2048 d}-\frac {b^{2} {\mathrm e}^{6 d x +6 c}}{192 d}+\frac {7 \,{\mathrm e}^{4 d x +4 c} b^{2}}{256 d}+\frac {{\mathrm e}^{4 d x +4 c} a b}{32 d}-\frac {7 \,{\mathrm e}^{2 d x +2 c} b^{2}}{64 d}-\frac {{\mathrm e}^{2 d x +2 c} a b}{4 d}+\frac {7 \,{\mathrm e}^{-2 d x -2 c} b^{2}}{64 d}+\frac {{\mathrm e}^{-2 d x -2 c} a b}{4 d}-\frac {7 \,{\mathrm e}^{-4 d x -4 c} b^{2}}{256 d}-\frac {{\mathrm e}^{-4 d x -4 c} a b}{32 d}+\frac {b^{2} {\mathrm e}^{-6 d x -6 c}}{192 d}-\frac {b^{2} {\mathrm e}^{-8 d x -8 c}}{2048 d}\) \(218\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sinh(d*x+c)^4)^2,x,method=_RETURNVERBOSE)

[Out]

a^2*x+1/2*(-7/16*b^2-a*b)*sinh(2*d*x+2*c)/d+1/4*(7/32*b^2+1/4*a*b)*sinh(4*d*x+4*c)/d+35/128*b^2*x+3/4*a*b*x-1/
96*b^2*sinh(6*d*x+6*c)/d+1/1024*b^2*sinh(8*d*x+8*c)/d

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 183, normalized size = 1.46 \begin {gather*} \frac {1}{32} \, a b {\left (24 \, x + \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} - \frac {8 \, e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {8 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} + a^{2} x - \frac {1}{6144} \, b^{2} {\left (\frac {{\left (32 \, e^{\left (-2 \, d x - 2 \, c\right )} - 168 \, e^{\left (-4 \, d x - 4 \, c\right )} + 672 \, e^{\left (-6 \, d x - 6 \, c\right )} - 3\right )} e^{\left (8 \, d x + 8 \, c\right )}}{d} - \frac {1680 \, {\left (d x + c\right )}}{d} - \frac {672 \, e^{\left (-2 \, d x - 2 \, c\right )} - 168 \, e^{\left (-4 \, d x - 4 \, c\right )} + 32 \, e^{\left (-6 \, d x - 6 \, c\right )} - 3 \, e^{\left (-8 \, d x - 8 \, c\right )}}{d}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(d*x+c)^4)^2,x, algorithm="maxima")

[Out]

1/32*a*b*(24*x + e^(4*d*x + 4*c)/d - 8*e^(2*d*x + 2*c)/d + 8*e^(-2*d*x - 2*c)/d - e^(-4*d*x - 4*c)/d) + a^2*x
- 1/6144*b^2*((32*e^(-2*d*x - 2*c) - 168*e^(-4*d*x - 4*c) + 672*e^(-6*d*x - 6*c) - 3)*e^(8*d*x + 8*c)/d - 1680
*(d*x + c)/d - (672*e^(-2*d*x - 2*c) - 168*e^(-4*d*x - 4*c) + 32*e^(-6*d*x - 6*c) - 3*e^(-8*d*x - 8*c))/d)

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 205, normalized size = 1.64 \begin {gather*} \frac {3 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{7} + 3 \, {\left (7 \, b^{2} \cosh \left (d x + c\right )^{3} - 8 \, b^{2} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{5} + {\left (21 \, b^{2} \cosh \left (d x + c\right )^{5} - 80 \, b^{2} \cosh \left (d x + c\right )^{3} + 12 \, {\left (8 \, a b + 7 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 3 \, {\left (128 \, a^{2} + 96 \, a b + 35 \, b^{2}\right )} d x + 3 \, {\left (b^{2} \cosh \left (d x + c\right )^{7} - 8 \, b^{2} \cosh \left (d x + c\right )^{5} + 4 \, {\left (8 \, a b + 7 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} - 8 \, {\left (16 \, a b + 7 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{384 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(d*x+c)^4)^2,x, algorithm="fricas")

[Out]

1/384*(3*b^2*cosh(d*x + c)*sinh(d*x + c)^7 + 3*(7*b^2*cosh(d*x + c)^3 - 8*b^2*cosh(d*x + c))*sinh(d*x + c)^5 +
 (21*b^2*cosh(d*x + c)^5 - 80*b^2*cosh(d*x + c)^3 + 12*(8*a*b + 7*b^2)*cosh(d*x + c))*sinh(d*x + c)^3 + 3*(128
*a^2 + 96*a*b + 35*b^2)*d*x + 3*(b^2*cosh(d*x + c)^7 - 8*b^2*cosh(d*x + c)^5 + 4*(8*a*b + 7*b^2)*cosh(d*x + c)
^3 - 8*(16*a*b + 7*b^2)*cosh(d*x + c))*sinh(d*x + c))/d

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 332 vs. \(2 (116) = 232\).
time = 1.04, size = 332, normalized size = 2.66 \begin {gather*} \begin {cases} a^{2} x + \frac {3 a b x \sinh ^{4}{\left (c + d x \right )}}{4} - \frac {3 a b x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {3 a b x \cosh ^{4}{\left (c + d x \right )}}{4} + \frac {5 a b \sinh ^{3}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{4 d} - \frac {3 a b \sinh {\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{4 d} + \frac {35 b^{2} x \sinh ^{8}{\left (c + d x \right )}}{128} - \frac {35 b^{2} x \sinh ^{6}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{32} + \frac {105 b^{2} x \sinh ^{4}{\left (c + d x \right )} \cosh ^{4}{\left (c + d x \right )}}{64} - \frac {35 b^{2} x \sinh ^{2}{\left (c + d x \right )} \cosh ^{6}{\left (c + d x \right )}}{32} + \frac {35 b^{2} x \cosh ^{8}{\left (c + d x \right )}}{128} + \frac {93 b^{2} \sinh ^{7}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{128 d} - \frac {511 b^{2} \sinh ^{5}{\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{384 d} + \frac {385 b^{2} \sinh ^{3}{\left (c + d x \right )} \cosh ^{5}{\left (c + d x \right )}}{384 d} - \frac {35 b^{2} \sinh {\left (c + d x \right )} \cosh ^{7}{\left (c + d x \right )}}{128 d} & \text {for}\: d \neq 0 \\x \left (a + b \sinh ^{4}{\left (c \right )}\right )^{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(d*x+c)**4)**2,x)

[Out]

Piecewise((a**2*x + 3*a*b*x*sinh(c + d*x)**4/4 - 3*a*b*x*sinh(c + d*x)**2*cosh(c + d*x)**2/2 + 3*a*b*x*cosh(c
+ d*x)**4/4 + 5*a*b*sinh(c + d*x)**3*cosh(c + d*x)/(4*d) - 3*a*b*sinh(c + d*x)*cosh(c + d*x)**3/(4*d) + 35*b**
2*x*sinh(c + d*x)**8/128 - 35*b**2*x*sinh(c + d*x)**6*cosh(c + d*x)**2/32 + 105*b**2*x*sinh(c + d*x)**4*cosh(c
 + d*x)**4/64 - 35*b**2*x*sinh(c + d*x)**2*cosh(c + d*x)**6/32 + 35*b**2*x*cosh(c + d*x)**8/128 + 93*b**2*sinh
(c + d*x)**7*cosh(c + d*x)/(128*d) - 511*b**2*sinh(c + d*x)**5*cosh(c + d*x)**3/(384*d) + 385*b**2*sinh(c + d*
x)**3*cosh(c + d*x)**5/(384*d) - 35*b**2*sinh(c + d*x)*cosh(c + d*x)**7/(128*d), Ne(d, 0)), (x*(a + b*sinh(c)*
*4)**2, True))

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 183, normalized size = 1.46 \begin {gather*} \frac {1}{128} \, {\left (128 \, a^{2} + 96 \, a b + 35 \, b^{2}\right )} x + \frac {b^{2} e^{\left (8 \, d x + 8 \, c\right )}}{2048 \, d} - \frac {b^{2} e^{\left (6 \, d x + 6 \, c\right )}}{192 \, d} + \frac {b^{2} e^{\left (-6 \, d x - 6 \, c\right )}}{192 \, d} - \frac {b^{2} e^{\left (-8 \, d x - 8 \, c\right )}}{2048 \, d} + \frac {{\left (8 \, a b + 7 \, b^{2}\right )} e^{\left (4 \, d x + 4 \, c\right )}}{256 \, d} - \frac {{\left (16 \, a b + 7 \, b^{2}\right )} e^{\left (2 \, d x + 2 \, c\right )}}{64 \, d} + \frac {{\left (16 \, a b + 7 \, b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{64 \, d} - \frac {{\left (8 \, a b + 7 \, b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}}{256 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(d*x+c)^4)^2,x, algorithm="giac")

[Out]

1/128*(128*a^2 + 96*a*b + 35*b^2)*x + 1/2048*b^2*e^(8*d*x + 8*c)/d - 1/192*b^2*e^(6*d*x + 6*c)/d + 1/192*b^2*e
^(-6*d*x - 6*c)/d - 1/2048*b^2*e^(-8*d*x - 8*c)/d + 1/256*(8*a*b + 7*b^2)*e^(4*d*x + 4*c)/d - 1/64*(16*a*b + 7
*b^2)*e^(2*d*x + 2*c)/d + 1/64*(16*a*b + 7*b^2)*e^(-2*d*x - 2*c)/d - 1/256*(8*a*b + 7*b^2)*e^(-4*d*x - 4*c)/d

________________________________________________________________________________________

Mupad [B]
time = 0.29, size = 108, normalized size = 0.86 \begin {gather*} \frac {21\,b^2\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )-84\,b^2\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )-4\,b^2\,\mathrm {sinh}\left (6\,c+6\,d\,x\right )+\frac {3\,b^2\,\mathrm {sinh}\left (8\,c+8\,d\,x\right )}{8}-192\,a\,b\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )+24\,a\,b\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )+384\,a^2\,d\,x+105\,b^2\,d\,x+288\,a\,b\,d\,x}{384\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sinh(c + d*x)^4)^2,x)

[Out]

(21*b^2*sinh(4*c + 4*d*x) - 84*b^2*sinh(2*c + 2*d*x) - 4*b^2*sinh(6*c + 6*d*x) + (3*b^2*sinh(8*c + 8*d*x))/8 -
 192*a*b*sinh(2*c + 2*d*x) + 24*a*b*sinh(4*c + 4*d*x) + 384*a^2*d*x + 105*b^2*d*x + 288*a*b*d*x)/(384*d)

________________________________________________________________________________________